package com.qianyu.entity.dto;

import com.qianyu.entity.base.BaseNotifyDto;
import com.qianyu.entity.base.PageDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

@Data
@ApiModel(value = "QunDto")
public class QunDto {

    @Data
    @ApiModel(value = "QunDto&QunSaveDto")
    public static class QunSaveDto {
        /**
         * 群名
         */
        @NotBlank(message = "[群名]不能为空")
        @Size(max = 54, message = "编码长度不能超过54")
        @ApiModelProperty("群名")
        private String name;

        /**
         * 加群密码
         */
        @NotBlank(message = "[加群密码]不能为空")
        @Size(max = 255, message = "编码长度不能超过255")
        @ApiModelProperty("加群密码")
        private String pwd;

        /**
         * 发包分组id
         */
        @NotNull(message = "[发包分组id]不能为空")
        @ApiModelProperty("发包分组id")
        private Integer yjGroup;

        /**
         * 领包云机分组
         */
        @NotNull(message = "[领包云机分组]不能为空")
        @ApiModelProperty("领包云机分组")
        private Integer cyjGroup;

        /**
         * 领号最大数量
         */
        @NotNull(message = "[领号最大数量]不能为空")
        @ApiModelProperty("领号最大数量")
        private Integer confClaimQnum;
        /**
         * 群发金额上限
         */
        @NotNull(message = "[群发金额上限]不能为空")
        @ApiModelProperty("群发金额上限")
        private BigDecimal confGiveMaxMoney;

        /**
         * 领号保持在线数量
         */
        @NotNull(message = "[领号保持在线数量]不能为空")
        @ApiModelProperty("领号保持在线数量")
        private Integer confKeepOnlineNum;

    }

    @Data
    @ApiModel(value = "QunDto&QunNotifyDto")
    public static class QunNotifyDto extends BaseNotifyDto {

        @ApiModelProperty(value = "群id")
        private Long id;

        @ApiModelProperty(value = "加群链接")
        private String link;

        @ApiModelProperty(value = "群号")
        private String qunNo;
    }

    @Data
    @ApiModel(value = "QunDto&QunPageDto")
    public static class QunPageDto extends PageDTO {

        @ApiModelProperty("状态:0=待创建,1=创建成功,2=创建失败,3=群解散")
        private Integer status;

        @ApiModelProperty("群名")
        private String name;

    }
}
